//
//  TransferableBookmark.swift
//  RssFly
//
//  Created by shen on 2023/10/17.
//

import SwiftUI
import UniformTypeIdentifiers

struct TransferableBookmark: Codable, Transferable {
    var objectURI: URL
    var linkURL: URL

    static var transferRepresentation: some TransferRepresentation {
        CodableRepresentation(contentType: .denBookmark)
        ProxyRepresentation(exporting: \.linkURL)
        ProxyRepresentation(exporting: \.linkURL.absoluteString)
    }
}

extension UTType {
    static var denBookmark = UTType(exportedAs: "net.devsci.den.transferable.bookmark")
}
